package org.example.entity;

import java.sql.Timestamp;

public class Like {
    private String likeId;
    private String blogId;
    private Integer userId;
    private String commentId;
    private boolean type; // true:点赞, false:点踩
    private Timestamp createdAt;

    // 修复构造函数
    public Like(Integer userId, String blogId, boolean type) {
        this.userId = userId;
        this.blogId = blogId;
        this.type = type;
    }

    // Getters and Setters
    public String getLikeId() {
        return likeId;
    }

    public void setLikeId(String likeId) {
        this.likeId = likeId;
    }

    public String getBlogId() {
        return blogId;
    }

    public void setBlogId(String blogId) {
        this.blogId = blogId;
    }

    public Integer getUserId() { return userId; }
    public void setUserId(Integer userId) { this.userId = userId; }

    public String getCommentId() {
        return commentId;
    }

    public void setCommentId(String commentId) {
        this.commentId = commentId;
    }

    public boolean isType() {
        return type;
    }

    public void setType(boolean type) {
        this.type = type;
    }

    public Timestamp getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Timestamp createdAt) {
        this.createdAt = createdAt;
    }
}